package com.heisen.systemapi.service;

import com.heisen.base.entity.Api;
import com.heisen.base.entity.SystemUser;
import com.heisen.systemapi.service.fallback.UserServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author sen
 * @description
 * @date 2023/12/18 17:22
 */
@FeignClient(value = "system", contextId = "userClient", fallbackFactory = UserServiceFallback.class)
public interface UserService {

    @GetMapping("hello")
    String hello(@RequestParam String name);

    /**
     *  获取登入的用户
     * @param username
     * @return
     */
    @GetMapping("/user/findUserByUsername")
    Api<SystemUser> LoginByName(@RequestParam("username") String username);

}
